﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../assets/css/yui-cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
    <script src="../assets/js/yui-source.js"></script>
	<title>SoundJS v1.0.0 API Documentation : HTMLAudioPlugin</title>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
            
                <h1><a href="http://createjs.site/soundjs"><img src="../assets/docs-icon-SoundJS.png" title="SoundJS"></a></h1>
            
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Documentation for: 1.0.0</em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
    <h2 class="off-left">APIs</h2>
    <div id="api-tabview" class="tabview">
        <ul class="tabs">
            <li><a href="#api-classes">Classes</a></li>
        </ul>

        <div id="api-tabview-filter">
            <input type="search" id="api-filter" placeholder="Type to filter APIs">
        </div>

        <div id="api-tabview-panel">
            <ul id="api-classes" class="apis classes">
            
                <li><a href="AbstractPlugin.html">AbstractPlugin</a></li>
            
                <li><a href="AbstractSoundInstance.html">AbstractSoundInstance</a></li>
            
                <li><a href="AudioSprite.html">AudioSprite</a></li>
            
                <li><a href="CordovaAudioLoader.html">CordovaAudioLoader</a></li>
            
                <li><a href="CordovaAudioPlugin.html">CordovaAudioPlugin</a></li>
            
                <li><a href="CordovaAudioSoundInstance.html">CordovaAudioSoundInstance</a></li>
            
                <li><a href="ErrorEvent.html">ErrorEvent</a></li>
            
                <li><a href="Event.html">Event</a></li>
            
                <li><a href="EventDispatcher.html">EventDispatcher</a></li>
            
                <li><a href="FlashAudioLoader.html">FlashAudioLoader</a></li>
            
                <li><a href="FlashAudioPlugin.html">FlashAudioPlugin</a></li>
            
                <li><a href="FlashAudioSoundInstance.html">FlashAudioSoundInstance</a></li>
            
                <li><a href="HTMLAudioPlugin.html">HTMLAudioPlugin</a></li>
            
                <li><a href="HTMLAudioSoundInstance.html">HTMLAudioSoundInstance</a></li>
            
                <li><a href="HTMLAudioTagPool.html">HTMLAudioTagPool</a></li>
            
                <li><a href="PlayPropsConfig.html">PlayPropsConfig</a></li>
            
                <li><a href="Sound.html">Sound</a></li>
            
                <li><a href="SoundJS.html">SoundJS</a></li>
            
                <li><a href="Utility%20Methods.html">Utility Methods</a></li>
            
                <li><a href="WebAudioLoader.html">WebAudioLoader</a></li>
            
                <li><a href="WebAudioPlugin.html">WebAudioPlugin</a></li>
            
                <li><a href="WebAudioSoundInstance.html">WebAudioSoundInstance</a></li>
            
            </ul>

            <ul id="api-modules" class="apis modules">
            
                <li><a href="../modules/CreateJS.html">CreateJS</a></li>
            
                <li><a href="../modules/SoundJS.html">SoundJS</a></li>
            
            </ul>
        </div>
    </div>
</div>

            </div>
        </div>
        <div class="yui3-u-3-4">
            <div id="api-options">
        Show:
        <label for="api-show-inherited">
            <input type="checkbox" id="api-show-inherited" checked="">
            Inherited
        </label>

        <label for="api-show-protected">
            <input type="checkbox" id="api-show-protected">
            Protected
        </label>

        <label for="api-show-private">
            <input type="checkbox" id="api-show-private">
            Private
        </label>
        <label for="api-show-deprecated">
            <input type="checkbox" id="api-show-deprecated">
            Deprecated
        </label>

    </div>
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
                        <h1>HTMLAudioPlugin Class</h1>
<div class="box meta">
    

    
        <div class="extends">
            Extends <a href="AbstractPlugin.html" class="crosslink">AbstractPlugin</a>
        </div>
    

    
        <div class="foundat">
            Defined in: <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l41"><code>HTMLAudioPlugin:41</code></a>
        </div>
    

    
        
            Module: <a href="../modules/SoundJS.html">SoundJS</a>
        
    

    
</div>



<div class="box intro">
    <p>Play sounds using HTML &lt;audio&gt; tags in the browser. This plugin is the second priority plugin installed
by default, after the <a href="WebAudioPlugin.html" class="crosslink">WebAudioPlugin</a>.  For older browsers that do not support html
audio, include and install the <a href="FlashAudioPlugin.html" class="crosslink">FlashAudioPlugin</a>.</p>
<p><h4>Known Browser and OS issues for HTML Audio</h4>
<b>All browsers</b><br>
Testing has shown in all browsers there is a limit to how many audio tag instances you are allowed.  If you exceed
this limit, you can expect to see unpredictable results. Please use Sound.MAX_INSTANCES as
a guide to how many total audio tags you can safely use in all browsers.  This issue is primarily limited to IE9.
<p><b>IE html limitations</b><br></p>
<ul><li>There is a delay in applying volume changes to tags that occurs once playback is started. So if you have
muted all sounds, they will all play during this delay until the mute applies internally. This happens regardless of
when or how you apply the volume change, as the tag seems to need to play to apply it.</li>
<li>MP3 encoding will not always work for audio tags if it&#39;s not default.  We&#39;ve found default encoding with
64kbps works.</li>
<li>Occasionally very short samples will get cut off.</li>
<li>There is a limit to how many audio tags you can load or play at once, which appears to be determined by
hardware and browser settings.  See HTMLAudioPlugin.MAX_INSTANCES for a safe estimate.
Note that audio sprites can be used as a solution to this issue.</li></ul>

<p><b>Safari limitations</b><br></p>
<ul><li>Safari requires Quicktime to be installed for audio playback.</li></ul>

<p><b>iOS 6 limitations</b><br></p>
<ul><li>can only have one &lt;audio&gt; tag</li>
        <li>can not preload or autoplay the audio</li>
        <li>can not cache the audio</li>
        <li>can not play the audio except inside a user initiated event.</li>
        <li>Note it is recommended to use <a href="WebAudioPlugin.html" class="crosslink">WebAudioPlugin</a> for iOS (6+)</li>
        <li>audio sprites can be used to mitigate some of these issues and are strongly recommended on iOS</li>
</ul>

<p><b>Android Native Browser limitations</b><br></p>
<ul><li>We have no control over audio volume. Only the user can set volume on their device.</li>
     <li>We can only play audio inside a user event (touch/click).  This currently means you cannot loop sound or use a delay.</li></ul>
<b> Android Chrome 26.0.1410.58 specific limitations</b><br>
<ul> <li>Can only play 1 sound at a time.</li>
     <li>Sound is not cached.</li>
     <li>Sound can only be loaded in a user initiated touch/click event.</li>
     <li>There is a delay before a sound is played, presumably while the src is loaded.</li>
</ul>

<p>See <a href="Sound.html" class="crosslink">Sound</a> for general notes on known issues.</p>

</div>


    <div class="constructor">
        <h2>Constructor</h2>
        <div id="method_HTMLAudioPlugin" class="method item">
    <h3 class="name"><code>HTMLAudioPlugin</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l41"><code>HTMLAudioPlugin:41</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    

    

    
</div>

    </div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

        
            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
        
        
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
        
        
        
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

            
                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods extends">
                        
                            <li class="index-item method private">
                                <a href="#method__generateCapabilities">_generateCapabilities</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item method protected inherited">
                                <a href="#method__handlePreloadComplete">_handlePreloadComplete</a>

                                
                                
                            </li>
                        
                            <li class="index-item method protected inherited">
                                <a href="#method__handlePreloadError">_handlePreloadError</a>

                                
                                
                            </li>
                        
                            <li class="index-item method protected inherited">
                                <a href="#method__updateVolume">_updateVolume</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_create">create</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_getVolume">getVolume</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_isPreloadComplete">isPreloadComplete</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_isPreloadStarted">isPreloadStarted</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_isSupported">isSupported</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_preload">preload</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_register">register</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_removeAllSounds">removeAllSounds</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_removeSound">removeSound</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_setMute">setMute</a>

                                
                                
                            </li>
                        
                            <li class="index-item method inherited">
                                <a href="#method_setVolume">setVolume</a>

                                
                                
                            </li>
                        
                    </ul>
                </div>
            

            
                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties extends">
                        
                            <li class="index-item property private">
                                <a href="#property__AUDIO_ENDED">_AUDIO_ENDED</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property private">
                                <a href="#property__AUDIO_READY">_AUDIO_READY</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property private">
                                <a href="#property__AUDIO_SEEKED">_AUDIO_SEEKED</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property private">
                                <a href="#property__AUDIO_STALLED">_AUDIO_STALLED</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property protected inherited">
                                <a href="#property__audioSources">_audioSources</a>

                                
                                
                            </li>
                        
                            <li class="index-item property private">
                                <a href="#property__capabilities">_capabilities</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property private">
                                <a href="#property__TIME_UPDATE">_TIME_UPDATE</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                            <li class="index-item property protected inherited">
                                <a href="#property__volume">_volume</a>

                                
                                
                            </li>
                        
                            <li class="index-item property">
                                <a href="#property_MAX_INSTANCES">MAX_INSTANCES</a>

                                
                                    <span class="flag static">static</span>
                                
                                
                            </li>
                        
                    </ul>
                </div>
            

            

            
        </div>

        
            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

                
                    <div id="method__generateCapabilities" class="method item private">
    <h3 class="name"><code>_generateCapabilities</code></h3>

    
        <span class="paren">()</span>
    

    

    

    
        <span class="flag private">private</span>
    

    

    
        <span class="flag static">static</span>
    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l193"><code>_generateCapabilities:193</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Determine the capabilities of the plugin. Used internally. Please see the Sound API <a href="Sound.html#property_capabilities" class="crosslink">capabilities</a>
method for an overview of plugin capabilities.</p>

    </div>

    

    

    
</div>

                
                    <div id="method__handlePreloadComplete" class="method item protected inherited">
    <h3 class="name"><code>_handlePreloadComplete</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>event</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    
        <span class="flag protected">protected</span>
    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method__handlePreloadComplete">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l280"><code>_handlePreloadComplete:280</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Handles internal preload completion.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">event</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method__handlePreloadError" class="method item protected inherited">
    <h3 class="name"><code>_handlePreloadError</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>event</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    
        <span class="flag protected">protected</span>
    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method__handlePreloadError">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l302"><code>_handlePreloadError:302</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Handles internal preload errors</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">event</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method__updateVolume" class="method item protected inherited">
    <h3 class="name"><code>_updateVolume</code></h3>

    
        <span class="paren">()</span>
    

    

    

    
        <span class="flag protected">protected</span>
    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method__updateVolume">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l312"><code>_updateVolume:312</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Set the gain value for master audio. Should not be called externally.</p>

    </div>

    

    

    
</div>

                
                    <div id="method_create" class="method item inherited">
    <h3 class="name"><code>create</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>src</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>startTime</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>duration</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="AbstractSoundInstance.html" class="crosslink">AbstractSoundInstance</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_create">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l213"><code>create:213</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Create a sound instance. If the sound has not been preloaded, it is internally preloaded here.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">src</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                        <p>The sound source to use.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">startTime</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
                    

                    

                    <div class="param-description">
                        <p>Audio sprite property used to apply an offset, in milliseconds.</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">duration</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
                    

                    

                    <div class="param-description">
                        <p>Audio sprite property used to set the time the clip plays for, in milliseconds.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="AbstractSoundInstance.html" class="crosslink">AbstractSoundInstance</a></span>:
                    
                    <p>A sound instance for playback and control.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_getVolume" class="method item inherited">
    <h3 class="name"><code>getVolume</code></h3>

    
        <span class="paren">()</span>
    

    
        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_getVolume">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l252"><code>getVolume:252</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Get the master volume of the plugin, which affects all SoundInstances.</p>

    </div>

    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>:
                    
                    <p>The volume level, between 0 and 1.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_isPreloadComplete" class="method item inherited">
    <h3 class="name"><code>isPreloadComplete</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>src</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_isPreloadComplete">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l175"><code>isPreloadComplete:175</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Checks if preloading has finished for a specific source.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">src</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                        <p>The sound URI to load.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
                    
                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_isPreloadStarted" class="method item inherited">
    <h3 class="name"><code>isPreloadStarted</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>src</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_isPreloadStarted">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l164"><code>isPreloadStarted:164</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Checks if preloading has started for a specific source. If the source is found, we can assume it is loading,
or has already finished loading.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">src</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                        <p>The sound URI to check.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
                    
                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_isSupported" class="method item">
    <h3 class="name"><code>isSupported</code></h3>

    
        <span class="paren">()</span>
    

    
        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
        </span>
    

    

    

    

    
        <span class="flag static">static</span>
    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l181"><code>isSupported:181</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Determine if the plugin can be used in the current browser/OS. Note that HTML audio is available in most modern
browsers, but is disabled in iOS because of its limitations.</p>

    </div>

    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
                    
                    <p>If the plugin can be initialized.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_preload" class="method item inherited">
    <h3 class="name"><code>preload</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>loader</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_preload">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l154"><code>preload:154</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Internally preload a sound.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">loader</code>
                        <span class="type">Loader</span>
                    

                    

                    <div class="param-description">
                        <p>The sound URI to load.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_register" class="method item inherited">
    <h3 class="name"><code>register</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>loadItem</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_register">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l132"><code>register:132</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Pre-register a sound for preloading and setup. This is called by <a href="Sound.html" class="crosslink">Sound</a>.
Note all plugins provide a <code>Loader</code> instance, which <a href="http://preloadjs.com" target="_blank">PreloadJS</a>
can use to assist with preloading.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">loadItem</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                        <p>An Object containing the source of the audio
Note that not every plugin will manage this value.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
                    
                    <p>A result object, containing a "tag" for preloading purposes.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_removeAllSounds" class="method item inherited">
    <h3 class="name"><code>removeAllSounds</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>src</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_removeAllSounds">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l202"><code>removeAllSounds:202</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Remove all sounds added using WebAudioPlugin/register. Note this does not cancel a preload.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">src</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                        <p>The sound URI to unload.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_removeSound" class="method item inherited">
    <h3 class="name"><code>removeSound</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>src</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_removeSound">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l185"><code>removeSound:185</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Remove a sound added using WebAudioPlugin/register. Note this does not cancel a preload.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">src</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                        <p>The sound URI to unload.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_setMute" class="method item inherited">
    <h3 class="name"><code>setMute</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>value</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_setMute">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l261"><code>setMute:261</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Mute all sounds via the plugin.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">value</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
                    

                    

                    <div class="param-description">
                        <p>If all sound should be muted or not. Note that plugin-level muting just looks up
the mute value of Sound <a href="Sound.html#property_muted" class="crosslink">muted</a>, so this property is not used here.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
                    
                    <p>If the mute call succeeds.</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_setVolume" class="method item inherited">
    <h3 class="name"><code>setVolume</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>value</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#method_setVolume">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l239"><code>setVolume:239</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Set the master volume of the plugin, which affects all SoundInstances.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">value</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
                    

                    

                    <div class="param-description">
                        <p>The volume to set, between 0 and 1.</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
                    
                    <p>If the plugin processes the setVolume call (true). The Sound class will affect all the
instances manually otherwise.</p>

                
            </div>
        </div>
    

    
</div>

                
            </div>
        

        
            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

                
                    <div id="property__AUDIO_ENDED" class="property item private">
    <h3 class="name"><code>_AUDIO_ENDED</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>

    

    
        <span class="flag private">private</span>
    

    

    
        <span class="flag static">static</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l127"><code>_AUDIO_ENDED:127</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>Event constant for the "ended" event for cleaner code.</p>

    </div>

    
        <p><strong>Default:</strong> ended</p>
    

    

    
</div>

                
                    <div id="property__AUDIO_READY" class="property item private">
    <h3 class="name"><code>_AUDIO_READY</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>

    

    
        <span class="flag private">private</span>
    

    

    
        <span class="flag static">static</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l117"><code>_AUDIO_READY:117</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>Event constant for the "canPlayThrough" event for cleaner code.</p>

    </div>

    
        <p><strong>Default:</strong> canplaythrough</p>
    

    

    
</div>

                
                    <div id="property__AUDIO_SEEKED" class="property item private">
    <h3 class="name"><code>_AUDIO_SEEKED</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>

    

    
        <span class="flag private">private</span>
    

    

    
        <span class="flag static">static</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l137"><code>_AUDIO_SEEKED:137</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>Event constant for the "seeked" event for cleaner code.  We utilize this event for maintaining loop events.</p>

    </div>

    
        <p><strong>Default:</strong> seeked</p>
    

    

    
</div>

                
                    <div id="property__AUDIO_STALLED" class="property item private">
    <h3 class="name"><code>_AUDIO_STALLED</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>

    

    
        <span class="flag private">private</span>
    

    

    
        <span class="flag static">static</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l147"><code>_AUDIO_STALLED:147</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>Event constant for the "stalled" event for cleaner code.</p>

    </div>

    
        <p><strong>Default:</strong> stalled</p>
    

    

    
</div>

                
                    <div id="property__audioSources" class="property item protected inherited">
    <h3 class="name"><code>_audioSources</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>

    

    
        <span class="flag protected">protected</span>
    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#property__audioSources">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l65"><code>_audioSources:65</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>Object hash indexed by the source URI of each file to indicate if an audio source has begun loading,
is currently loading, or has completed loading.  Can be used to store non boolean data after loading
is complete (for example arrayBuffers for web audio).</p>

    </div>

    

    

    
</div>

                
                    <div id="property__capabilities" class="property item private">
    <h3 class="name"><code>_capabilities</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>

    

    
        <span class="flag private">private</span>
    

    

    
        <span class="flag static">static</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l168"><code>_capabilities:168</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>The capabilities of the plugin. This is generated via the <a href="HTMLAudioPlugin.html#method__generateCapabilities" class="crosslink">_generateCapabilities</a>
method. Please see the Sound <a href="Sound.html#property_capabilities" class="crosslink">capabilities</a> method for an overview of all
of the available properties.</p>

    </div>

    

    

    
</div>

                
                    <div id="property__TIME_UPDATE" class="property item private">
    <h3 class="name"><code>_TIME_UPDATE</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>

    

    
        <span class="flag private">private</span>
    

    

    
        <span class="flag static">static</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l157"><code>_TIME_UPDATE:157</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>Event constant for the "timeupdate" event for cleaner code.  Utilized for looping audio sprites.
This event callsback ever 15 to 250ms and can be dropped by the browser for performance.</p>

    </div>

    
        <p><strong>Default:</strong> timeupdate</p>
    

    

    
</div>

                
                    <div id="property__volume" class="property item protected inherited">
    <h3 class="name"><code>_volume</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>

    

    
        <span class="flag protected">protected</span>
    

    

    

    <div class="meta">
        
            
                <p>Inherited from
                <a href="AbstractPlugin.html#property__volume">AbstractPlugin</a>:
            
        
        
        <a href="../files/soundjs_AbstractPlugin.js.html#l83"><code>_volume:83</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>The internal master volume value of the plugin.</p>

    </div>

    
        <p><strong>Default:</strong> 1</p>
    

    

    
</div>

                
                    <div id="property_MAX_INSTANCES" class="property item">
    <h3 class="name"><code>MAX_INSTANCES</code></h3>
    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>

    

    

    

    
        <span class="flag static">static</span>
    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/soundjs_htmlaudio_HTMLAudioPlugin.js.html#l106"><code>MAX_INSTANCES:106</code></a>
        
        </p>

        

        
    </div>

    <div class="description">
        <p>The maximum number of instances that can be loaded or played. This is a browser limitation, primarily limited to IE9.
The actual number varies from browser to browser (and is largely hardware dependant), but this is a safe estimate.
Audio sprites work around this limitation.</p>

    </div>

    
        <p><strong>Default:</strong> 30</p>
    

    

    
</div>

                
            </div>
        

        

        
    </div>
</div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
